<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./ele-dialog.css">
    <script src="./jquery.min.js"></script>
    <script src="./ele-dialog.js"></script>
    <script>
        var ui = new eleDialog();
        console.log(ui);
        function messageInfo() {
            ui.msg({
                type: 'info',
                message: '消息提示'
            })
        }
        function messageSuccess() {
            ui.msg({
                type: 'success',
                message: '成功的消息'
            })
        }
        function messageWarning() {
            ui.msg({
                type: 'warning',
                message: '警告的消息'
            })
        }
        function messageError() {
            ui.msg({
                type: 'error',
                message: '错误的消息'
            })
        }
        function messageBoxAlert() {
            ui.alert({ content: '这是messageBoxAlert的弹窗' })
        }
        function messageBoxConfirm() {
            ui.confirm({
                content: '这是messageBoxConfirm的弹窗',
                btn: ['进入', '取消了']
            }, function () {
                ui.msg({
                    type: 'success',
                    message: '成功的回调'
                })
            })
        }
        function messageBoxPrompt() {
            ui.prompt({
                content: '这是输入框的弹窗',
                btn: ['下一步', '取消']
            }, function (msg) {
                ui.msg({
                    type: 'info',
                    message: '输入的内容是' + msg
                })
            })
        }

    </script>
</head>

<body>
    <h1>示例message</h1>
    <button onclick="messageInfo()">打开消息提示</button>
    <button onclick="messageSuccess()">成功的消息</button>
    <button onclick="messageWarning()">警告的消息</button>
    <button onclick="messageError()">错误的消息</button>
    <h1>示例messageBox</h1>
    <button onclick="messageBoxAlert()">messageBoxAlert</button>
    <button onclick="messageBoxConfirm()">confirm</button>
    <button onclick="messageBoxPrompt()">prompt</button>
</body>

</html>